﻿Imports System.Text

'http://www.imc.org/pdi/vcard-21.txt

Public Class vCard2_1
	Implements IvCard

	Public Property vCardItems As New List(Of vCardItem) Implements IvCard.vCardItems

	Public Function BuildvCardString() As String Implements IvCard.BuildvCardString
		Dim myvCardItems As List(Of vCardItem) = vCardItems.ToList
		myvCardItems.Insert(0, New vCardItem("BEGIN", "VCARD"))
		myvCardItems.Insert(1, New vCardItem("VERSION", "2.1"))
		myvCardItems.Add(New vCardItem("END", "VCARD"))

		Dim sb As New StringBuilder

		myvCardItems.ForEach(Function(x) sb.AppendLine(x.ToString))

		Return sb.ToString
	End Function
End Class
